/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techshop.controller;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import org.primefaces.model.menu.DefaultMenuModel;
import org.primefaces.model.menu.DefaultSubMenu;
import org.primefaces.model.menu.MenuModel;

/**
 *
 * @author Hai-PC
 */
@ManagedBean(name = "menuController")
@SessionScoped
public class MenuController extends AbstractController {

    private final MenuModel model;

    public MenuController() {
        model = new DefaultMenuModel();

        
        
        
        
        

        //--------------------------------------------------
        //Bán hàng
        DefaultSubMenu deliverySubMenu = new DefaultSubMenu("QUẢN LÝ BÁN HÀNG");

        /*
        

        

        

        //Bảo hàng
        DefaultSubMenu warrantySubMenu = new DefaultSubMenu("QUẢN LÝ BẢO HÀNH");

        item = new DefaultMenuItem("Phiếu bảo hành");
        item.setIcon("ui-icon-home");
        item.setOutcome("warrantynote");
        item.setAjax(false);
        warrantySubMenu.addElement(item);

        model.addElement(warrantySubMenu);

        //đổi hàng
        DefaultSubMenu changeSubMenu = new DefaultSubMenu("QUẢN LÝ ĐỔI HÀNG");

        item = new DefaultMenuItem("Đổi hàng(Hàng bị lỗi)");
        item.setIcon("ui-icon-home");
        item.setOutcome("changenote");
        item.setCommand("#{changeNoteController.resetChangeNoteID}");
        item.setAjax(false);
        changeSubMenu.addElement(item);

        model.addElement(changeSubMenu);

        //đổi hàng
        

        //Báo cáo
        DefaultSubMenu reportSubMenu = new DefaultSubMenu("QUẢN LÝ BÁO CÁO");
        
        item = new DefaultMenuItem("Báo cáo doanh thu bán hàng");
        item.setIcon("ui-icon-home");
        item.setOutcome("/admin/revenue_report/delivery_note_revenue/table.html");
        item.setAjax(false);
        reportSubMenu.addElement(item);
        
        item = new DefaultMenuItem("Báo cáo mua hàng cũ");
        item.setIcon("ui-icon-home");
        item.setOutcome("/admin/revenue_report/old_receipt_note_expenditure/table.html");
        item.setAjax(false);
        reportSubMenu.addElement(item);
        
        item = new DefaultMenuItem("Báo cáo chi");
        item.setIcon("ui-icon-home");
        item.setOutcome("/admin/revenue_report/payment_voucher_expenditure/table.html");
        item.setAjax(false);
        reportSubMenu.addElement(item);
        
        item = new DefaultMenuItem("Báo cáo tổng thu & chi");
        item.setIcon("ui-icon-home");
        item.setOutcome("/admin/revenue_report/revenue_expenditure/table.html");
        item.setAjax(false);
        reportSubMenu.addElement(item);
        
        item = new DefaultMenuItem("Báo cáo thu tiền dịch vụ");
        item.setIcon("ui-icon-home");
        item.setOutcome("/admin/revenue_report/service_note_revenue/table.html");
        item.setAjax(false);
        reportSubMenu.addElement(item);
        
        model.addElement(reportSubMenu);*/
    }

    public MenuModel getModel() {
        return model;
    }
}
